home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacPerl 5.0.3 / MacPerl Source ƒ / MacPerl5 / pod / modpods / Env.pod < prev    next >
Encoding:
Text File  |  1994-12-26  |  937 b   |  32 lines  |  [TEXT/MPS ]

  1. =head1 NAME
  2.  
  3. Env - Perl module that imports environment variables
  4.  
  5. =head1 DESCRIPTION
  6.  
  7. Perl maintains environment variables in a pseudo-associative-array
  8. named %ENV.  For when this access method is inconvenient, the Perl
  9. module C<Env> allows environment variables to be treated as simple
  10. variables.
  11.  
  12. The Env::import() function ties environment variables with suitable
  13. names to global Perl variables with the same names.  By default it
  14. does so with all existing environment variables (C<keys %ENV>).  If
  15. the import function receives arguments, it takes them to be a list of
  16. environment variables to tie; it's okay if they don't yet exist.
  17.  
  18. After an environment variable is tied, merely use it like a normal variable.
  19. You may access its value 
  20.  
  21.     @path = split(/:/, $PATH);
  22.  
  23. or modify it
  24.  
  25.     $PATH .= ":.";
  26.  
  27. however you'd like.
  28. To remove a tied environment variable from
  29. the environment, assign it the undefined value
  30.  
  31.     undef $PATH;
  32.